<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Zend Framework Extras API Documentation</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><link rel="stylesheet" href="css/jquery-ui.css" type="text/css"></link><link rel="stylesheet" href="css/docblox/jquery-ui-1.8.16.custom.css" type="text/css"></link><link rel="stylesheet" href="css/jquery.treeview.css" type="text/css"></link><link rel="stylesheet" href="css/theme.css" type="text/css"></link><script type="text/javascript" src="js/jquery-1.4.2.min.js"></script><script type="text/javascript" src="js/jquery-ui-1.8.2.custom.min.js"></script><script type="text/javascript" src="js/jquery.cookie.js"></script><script type="text/javascript" src="js/jquery.treeview.js"></script><script type="text/javascript">
            $(document).ready(function() {
                $(".filetree").treeview({
                    collapsed: true,
                    persist: "cookie"
                });

                $("#accordion").accordion({
                    collapsible: true,
                    autoHeight:  false,
                    fillSpace:   true
                });

                $(".tabs").tabs();
            });
        </script></head><body><div xmlns="" class="content">
<div class="sub-page-main-header-api-documentation"><h2>API Documentation</h2></div>
<div class="dotted-line"></div>
</div>
<div xmlns="" id="content">
<script xmlns:dbx="http://docblox-project.org/xsl/functions">

      function filterElements()
      {
        inherited = !$('#show-inherited').hasClass('deselected');
        public    = !$('#show-public').hasClass('deselected');
        protected = !$('#show-protected').hasClass('deselected');
        private   = !$('#show-private').hasClass('deselected');

        $('div.public').each(function(index, val) {
            $(val).toggle(public && !($(val).hasClass('inherited_from') && !inherited));
        });
        $('div.protected').each(function(index, val) {
            $(val).toggle(protected && !($(val).hasClass('inherited_from') && !inherited));
        });
        $('div.private').each(function(index, val) {
            $(val).toggle(private && !($(val).hasClass('inherited_from') && !inherited));
        });
      }

      $(document).ready(function() {
        $('a.gripper').click(function() {
            $(this).nextAll('div.code-tabs').slideToggle();
            $(this).children('img').toggle();
            return false;
        });

        $('div.method code span.highlight,div.function code span.highlight,div.constant code span.highlight,div.property code span.highlight').css('cursor', 'pointer');

        $('div.method code span.highlight,div.function code span.highlight,div.constant code span.highlight,div.property code span.highlight').click(function() {
            $(this).parent().nextAll('div.code-tabs').slideToggle();
            $(this).parent().prevAll('a.gripper').children('img').toggle();
            return false;
        });

        $('div.code-tabs').hide();
        $('a.gripper').show();
        $('div.code-tabs:empty').prevAll('a.gripper').html('');

        $('#show-public, #show-protected, #show-private, #show-inherited')
            .css('cursor', 'pointer')
            .click(function(){
                $(this).toggleClass('deselected');
                if ($(this).hasClass('deselected')) {
                  $(this).fadeTo('fast', '0.4');
                } else {
                  $(this).fadeTo('fast', '1.0');
                }
                filterElements();
                return false;
            });
        $('#show-protected, #show-private').click();

        // add the sliding behaviour to the file navigation and show it
        // it is initially hidden for non-JS users.
        $("#file-nav-box").show().hover(function() {
            $("#file-nav-container").slideDown(400);
        }, function() {
            $("#file-nav-container").slideUp(400);
        });
      });

      
    </script><h1 xmlns:dbx="http://docblox-project.org/xsl/functions" class="file">ZendX/Console/Process/Unix.php</h1>
<div xmlns:dbx="http://docblox-project.org/xsl/functions" id="file-nav-box">
<div id="file-nav-options">
              Show:
              <img src="images/icons/visibility_public.png" id="show-public"><img src="images/icons/visibility_protected.png" id="show-protected"><img src="images/icons/visibility_private.png" id="show-private"><span class="attribute" id="show-inherited">inherited</span>
</div>
<div id="file-nav-container">
<ul id="file-nav"><li>
<a href="#classes"><img src="images/icons/class.png" height="14">
                          Classes
                      </a><ul><li><a href="#%5CZendX_Console_Process_Unix">\ZendX_Console_Process_Unix</a></li></ul>
</li></ul>
<div style="clear: left;"></div>
</div>
<div id="file-nav-tab">
              Table of Contents
          </div>
</div>
<a xmlns:dbx="http://docblox-project.org/xsl/functions" name="top" class="anchor"></a><div id="file-description">
<p xmlns:dbx="http://docblox-project.org/xsl/functions" class="short-description">Zend Framework</p>
<div xmlns:dbx="http://docblox-project.org/xsl/functions" class="long-description"><p>LICENSE</p>

<p>This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.</p>
</div>
</div>
<dl class="file-info">
<dt xmlns:dbx="http://docblox-project.org/xsl/functions">Category</dt>
<dd xmlns:dbx="http://docblox-project.org/xsl/functions">ZendX
         
    </dd>
<dt xmlns:dbx="http://docblox-project.org/xsl/functions">Copyright</dt>
<dd xmlns:dbx="http://docblox-project.org/xsl/functions">Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
         
    </dd>
<dt xmlns:dbx="http://docblox-project.org/xsl/functions">License</dt>
<dd xmlns:dbx="http://docblox-project.org/xsl/functions">
<a href="http://framework.zend.com/license/new-bsd">New BSD License</a>
         
    </dd>
<dt xmlns:dbx="http://docblox-project.org/xsl/functions">Package</dt>
<dd xmlns:dbx="http://docblox-project.org/xsl/functions">ZendX_Console
         
    </dd>
<dt xmlns:dbx="http://docblox-project.org/xsl/functions">Version</dt>
<dd xmlns:dbx="http://docblox-project.org/xsl/functions">$Id: Unix.php 20165 2010-01-09 18:57:56Z bkarwin $
         
    </dd>
</dl>
<a name="classes" class="anchor"></a><a xmlns:dbx="http://docblox-project.org/xsl/functions" id="\ZendX_Console_Process_Unix" class="anchor"></a><h2 xmlns:dbx="http://docblox-project.org/xsl/functions" class="class">\ZendX_Console_Process_Unix<div class="to-top"><a href="#top">jump to top</a></div>
</h2>
<div xmlns:dbx="http://docblox-project.org/xsl/functions" class="class">
<small class="package"><b>Package: </b>ZendX\Console</small><p class="short-description">ZendX_Console_Process_Unix allows you to spawn a class as a separated process</p>
<div class="long-description">
</div>
<dl class="class-info">
<dt>Category</dt>
<dd>ZendX
         
    </dd>
<dt>Copyright</dt>
<dd>Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
         
    </dd>
<dt>License</dt>
<dd>
<a href="http://framework.zend.com/license/new-bsd">New BSD License</a>
         
    </dd>
</dl>
<h3>Constants</h3>
<div>
<a id="\ZendX_Console_Process_Unix::VOID_METHOD" class="anchor"></a><div class="constant publicC">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/constant.png" alt="Constant"> 
                <span class="highlight">VOID_METHOD</span>
                = 'void_method'</code><div class="description"><p class="short-description">Void method</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<dl class="constant-info"></dl>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::RETURN_METHOD" class="anchor"></a><div class="constant publicC">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/constant.png" alt="Constant"> 
                <span class="highlight">RETURN_METHOD</span>
                = 'void_method'</code><div class="description"><p class="short-description">Return method</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<dl class="constant-info"></dl>
</div>
<div class="clear"></div>
</div>
</div>
<h3>Properties</h3>
<div>
<a id="\ZendX_Console_Process_Unix::$_guid" class="anchor"></a><div class="property private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private">integer
                 <span class="highlight">$_guid</span>= 'null'
                </code><div class="description">
<p class="short-description">GUID of the child process owner</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Default value</strong><code>null</code><strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>integer</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::$_internalIpcData" class="anchor"></a><div class="property private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private">array
                 <span class="highlight">$_internalIpcData</span>= 'array()'
                </code><div class="description">
<p class="short-description">A data structure to hold data for Inter Process Communications</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Default value</strong><code>array()</code><strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>array</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::$_internalIpcKey" class="anchor"></a><div class="property private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private">integer
                 <span class="highlight">$_internalIpcKey</span>= ''
                </code><div class="description">
<p class="short-description">Key to access to Shared Memory Area.</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>integer</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::$_internalSemKey" class="anchor"></a><div class="property private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private">integer
                 <span class="highlight">$_internalSemKey</span>= ''
                </code><div class="description">
<p class="short-description">Key to access to Sync Semaphore.</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>integer</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::$_ipcIsOkay" class="anchor"></a><div class="property private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private">boolean
                 <span class="highlight">$_ipcIsOkay</span>= ''
                </code><div class="description">
<p class="short-description">Is Shared Memory Area OK? If not, the start() method will block.</p></div>
<div class="code-tabs">
<div class="long-description"><p>Otherwise we'll have a running child without any communication channel.</p>
</div>
<strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>boolean</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::$_ipcSegFile" class="anchor"></a><div class="property private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private">string
                 <span class="highlight">$_ipcSegFile</span>= ''
                </code><div class="description">
<p class="short-description">Filename of the IPC segment file</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>string</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::$_ipcSemFile" class="anchor"></a><div class="property private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private">string
                 <span class="highlight">$_ipcSemFile</span>= ''
                </code><div class="description">
<p class="short-description">Filename of the semaphor file</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>string</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::$_isChild" class="anchor"></a><div class="property private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private">boolean
                 <span class="highlight">$_isChild</span>= 'false'
                </code><div class="description">
<p class="short-description">Wether we are into child process or not</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Default value</strong><code>false</code><strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>boolean</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::$_isRunning" class="anchor"></a><div class="property private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private">boolean
                 <span class="highlight">$_isRunning</span>= 'false'
                </code><div class="description">
<p class="short-description">Whether the process is yet forked or not</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Default value</strong><code>false</code><strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>boolean</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::$_name" class="anchor"></a><div class="property private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private">string
                 <span class="highlight">$_name</span>= ''
                </code><div class="description">
<p class="short-description">Unique thread name</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>string</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::$_pid" class="anchor"></a><div class="property private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private">integer
                 <span class="highlight">$_pid</span>= 'null'
                </code><div class="description">
<p class="short-description">PID of the child process</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Default value</strong><code>null</code><strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>integer</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::$_puid" class="anchor"></a><div class="property private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private">integer
                 <span class="highlight">$_puid</span>= 'null'
                </code><div class="description">
<p class="short-description">UID of the child process owner</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Default value</strong><code>null</code><strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>integer</dd>
</dl>
</div>
<div class="clear"></div>
</div>
</div>
<h3>Methods</h3>
<div>
<a id="\ZendX_Console_Process_Unix::__construct()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">__construct</span><span class="nb-faded-text">(
          integer $puid
              =
              null, integer $guid
              =
              null, integer $umask
              =
              null
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Constructor method</p></div>
<div class="code-tabs">
<div class="long-description"><p>Allocates a new pseudo-thread object. Optionally, set a PUID, a GUID and
a UMASK for the child process. This also initialize Shared Memory
Segments for process communications.</p>
</div>
<strong>Parameters</strong><table class="argument-info">
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<th>$puid</th>
<td>integer</td>
<td><em></em></td>
</tr>
<tr>
<th>$guid</th>
<td>integer</td>
<td><em></em></td>
</tr>
<tr>
<th>$umask</th>
<td>integer</td>
<td><em></em></td>
</tr>
</table>
<strong>Throws</strong><table class="argument-info">
<thead><tr>
<th>Exception</th>
<th>Description</th>
</tr></thead>
<tr>
<td><a href="db_ZendX_Console_Process_Exception.html#%5CZendX_Console_Process_Exception">\ZendX_Console_Process_Exception</a></td>
<td><em>When running on windows</em></td>
</tr>
<tr>
<td><a href="db_ZendX_Console_Process_Exception.html#%5CZendX_Console_Process_Exception">\ZendX_Console_Process_Exception</a></td>
<td><em>When running in web enviroment</em></td>
</tr>
<tr>
<td><a href="db_ZendX_Console_Process_Exception.html#%5CZendX_Console_Process_Exception">\ZendX_Console_Process_Exception</a></td>
<td><em>When shmop_* functions don't exist</em></td>
</tr>
<tr>
<td><a href="db_ZendX_Console_Process_Exception.html#%5CZendX_Console_Process_Exception">\ZendX_Console_Process_Exception</a></td>
<td><em>When pcntl_* functions don't exist</em></td>
</tr>
<tr>
<td><a href="db_ZendX_Console_Process_Exception.html#%5CZendX_Console_Process_Exception">\ZendX_Console_Process_Exception</a></td>
<td><em>When posix_* functions don't exist</em></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::__destruct()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">__destruct</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Stop the child on destruction</p></div>
<div class="code-tabs"><div class="long-description">
</div></div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::_callCallbackMethod()" class="anchor"></a><div class="method protected">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"><span class="highlight">_callCallbackMethod</span><span class="nb-faded-text">(
          string $methodName, array $argList
              =
              array(), string $type
              =
              self::VOID_METHOD
          )
        </span>
        :
          mixed</code><div class="description"><p class="short_description">This is called from within the parent; all the communication stuff
is done here.</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Parameters</strong><table class="argument-info">
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<th>$methodName</th>
<td>string</td>
<td><em></em></td>
</tr>
<tr>
<th>$argList</th>
<td>array</td>
<td><em></em></td>
</tr>
<tr>
<th>$type</th>
<td>string</td>
<td><em></em></td>
</tr>
</table>
<strong>Returns</strong><table class="argument-info">
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<td>mixed</td>
<td></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::_cleanProcessContext()" class="anchor"></a><div class="method private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private"><span class="highlight">_cleanProcessContext</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Destroy thread context and free relative resources.</p></div>
<div class="code-tabs"><div class="long-description">
</div></div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::_createIpcSegment()" class="anchor"></a><div class="method private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private"><span class="highlight">_createIpcSegment</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          boolean</code><div class="description"><p class="short_description">Create an IPC segment</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Returns</strong><table class="argument-info">
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<td>boolean</td>
<td></td>
</tr>
</table>
<strong>Throws</strong><table class="argument-info">
<thead><tr>
<th>Exception</th>
<th>Description</th>
</tr></thead>
<tr>
<td><a href="db_ZendX_Console_Process_Exception.html#%5CZendX_Console_Process_Exception">\ZendX_Console_Process_Exception</a></td>
<td><em>When SHM segment can't be created</em></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::_createIpcSemaphore()" class="anchor"></a><div class="method private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private"><span class="highlight">_createIpcSemaphore</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          boolean</code><div class="description"><p class="short_description">Create IPC semaphore</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Returns</strong><table class="argument-info">
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<td>boolean</td>
<td></td>
</tr>
</table>
<strong>Throws</strong><table class="argument-info">
<thead><tr>
<th>Exception</th>
<th>Description</th>
</tr></thead>
<tr>
<td><a href="db_ZendX_Console_Process_Exception.html#%5CZendX_Console_Process_Exception">\ZendX_Console_Process_Exception</a></td>
<td><em>When semaphore can't be created</em></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::_readFromIpcSegment()" class="anchor"></a><div class="method private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private"><span class="highlight">_readFromIpcSegment</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Read data from IPC segment</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Throws</strong><table class="argument-info">
<thead><tr>
<th>Exception</th>
<th>Description</th>
</tr></thead>
<tr>
<td><a href="db_ZendX_Console_Process_Exception.html#%5CZendX_Console_Process_Exception">\ZendX_Console_Process_Exception</a></td>
<td><em>When writing of SHM segment fails</em></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::_run()" class="anchor"></a><div class="method protected">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"><span class="highlight">_run</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description">
<span class="attribute">abstract</span><p class="short_description">This method actually implements the pseudo-thread logic.</p>
</div>
<div class="code-tabs"><div class="long-description">
</div></div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::_sendSigUsr1()" class="anchor"></a><div class="method private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private"><span class="highlight">_sendSigUsr1</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Sends signal to the child process</p></div>
<div class="code-tabs"><div class="long-description">
</div></div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::_setAlive()" class="anchor"></a><div class="method protected">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"><span class="highlight">_setAlive</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Set a pseudo-thread property that can be read from parent process
in order to know the child activity.</p></div>
<div class="code-tabs"><div class="long-description"><p>Practical usage requires that child process calls this method at regular
time intervals; parent will use the getLastAlive() method to know
the elapsed time since the last pseudo-thread life signals...</p>
</div></div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::_sigHandler()" class="anchor"></a><div class="method private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private"><span class="highlight">_sigHandler</span><span class="nb-faded-text">(
          integer $signo
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">This is the signal handler that makes the communications between client
and server possible.</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Parameters</strong><table class="argument-info">
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<th>$signo</th>
<td>integer</td>
<td><em></em></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::_waitForIpcSemaphore()" class="anchor"></a><div class="method private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private"><span class="highlight">_waitForIpcSemaphore</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Wait for IPC Semaphore</p></div>
<div class="code-tabs"><div class="long-description">
</div></div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::_writeToIpcSegment()" class="anchor"></a><div class="method private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private"><span class="highlight">_writeToIpcSegment</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Write data to IPC segment</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Throws</strong><table class="argument-info">
<thead><tr>
<th>Exception</th>
<th>Description</th>
</tr></thead>
<tr>
<td><a href="db_ZendX_Console_Process_Exception.html#%5CZendX_Console_Process_Exception">\ZendX_Console_Process_Exception</a></td>
<td><em>When writing of SHM segment fails</em></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::_writeVariable()" class="anchor"></a><div class="method private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private"><span class="highlight">_writeVariable</span><span class="nb-faded-text">(
          string $name, mixed $value
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Acutally Write a variable to the shared memory segment</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Parameters</strong><table class="argument-info">
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<th>$name</th>
<td>string</td>
<td><em></em></td>
</tr>
<tr>
<th>$value</th>
<td>mixed</td>
<td><em></em></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::getLastAlive()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">getLastAlive</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          integer</code><div class="description"><p class="short_description">Read the time elapsed since the last child setAlive() call.</p></div>
<div class="code-tabs">
<div class="long-description"><p>This method is useful because often we have a pseudo-thread pool and we
need to know each pseudo-thread status. If the child executes the
setAlive() method, the parent with getLastAlive() can know that child is
alive.</p>
</div>
<strong>Returns</strong><table class="argument-info">
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<td>integer</td>
<td></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::getPid()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">getPid</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          integer</code><div class="description"><p class="short_description">Returns the PID of the current pseudo-thread.</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Returns</strong><table class="argument-info">
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<td>integer</td>
<td></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::getVariable()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">getVariable</span><span class="nb-faded-text">(
          string $name
          )
        </span>
        :
          mixed</code><div class="description"><p class="short_description">Get a variable from the shared memory segment. Returns NULL if the
variable doesn't exist.</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Parameters</strong><table class="argument-info">
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<th>$name</th>
<td>string</td>
<td><em></em></td>
</tr>
</table>
<strong>Returns</strong><table class="argument-info">
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<td>mixed</td>
<td></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::isRunning()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">isRunning</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          boolean</code><div class="description"><p class="short_description">Test if the pseudo-thread is already started.</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Returns</strong><table class="argument-info">
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<td>boolean</td>
<td></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::setVariable()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">setVariable</span><span class="nb-faded-text">(
          string $name, mixed $value
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Set a variable into the shared memory segment, so that it can accessed
both from the parent and from the child process. Variable names
beginning with underlines are only permitted to interal functions.</p></div>
<div class="code-tabs">
<div class="long-description">
</div>
<strong>Parameters</strong><table class="argument-info">
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<th>$name</th>
<td>string</td>
<td><em></em></td>
</tr>
<tr>
<th>$value</th>
<td>mixed</td>
<td><em></em></td>
</tr>
</table>
<strong>Throws</strong><table class="argument-info">
<thead><tr>
<th>Exception</th>
<th>Description</th>
</tr></thead>
<tr>
<td><a href="db_ZendX_Console_Process_Exception.html#%5CZendX_Console_Process_Exception">\ZendX_Console_Process_Exception</a></td>
<td><em>When an invalid variable name is supplied</em></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::start()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">start</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Causes this pseudo-thread to begin parallel execution.</p></div>
<div class="code-tabs">
<div class="long-description"><p>This method first checks of all the Shared Memory Segment. If okay, it
forks the child process, attaches signal handler and returns immediatly.
The status is set to running, and a PID is assigned. The result is that
two pseudo-threads are running concurrently: the current thread (which
returns from the call to the start() method) and the other thread (which
executes its run() method).</p>
</div>
<strong>Throws</strong><table class="argument-info">
<thead><tr>
<th>Exception</th>
<th>Description</th>
</tr></thead>
<tr>
<td><a href="db_ZendX_Console_Process_Exception.html#%5CZendX_Console_Process_Exception">\ZendX_Console_Process_Exception</a></td>
<td><em>When SHM segments can't be created</em></td>
</tr>
<tr>
<td><a href="db_ZendX_Console_Process_Exception.html#%5CZendX_Console_Process_Exception">\ZendX_Console_Process_Exception</a></td>
<td><em>When process forking fails</em></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\ZendX_Console_Process_Unix::stop()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">stop</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          boolean</code><div class="description"><p class="short_description">Causes the current thread to die.</p></div>
<div class="code-tabs">
<div class="long-description"><p>The relative process is killed and disappears immediately from the
processes list.</p>
</div>
<strong>Returns</strong><table class="argument-info">
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<td>boolean</td>
<td></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
<small xmlns="" class="footer">Documentation was generated by <a href="http://docblox-project.org">DocBlox 0.15.1</a>.
    </small></body></html>
